home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / message / msgbla / readme.txt < prev    next >
Encoding:
Text File  |  1994-10-10  |  8.4 KB  |  216 lines

  1. 10/10/94
  2. Message Blaster v2.2a
  3. Still more problems with WM_DESTROY. Seems the vbx was getting unloaded 
  4. improperly. Anyhow, it's fixed now.
  5.  
  6.  
  7. 8/31/94
  8. Message Blaster v2.2
  9. Fixed a problem with WM_DESTROY. It seems that VB reverses the message order
  10. and destroys the parent window and then the children of the parent. Anyhow,
  11. I was processing WM_DESTROY when I shouldn't have been. 
  12.  
  13.  
  14. 8/18/94
  15. Message Blaster v2.1b
  16. Again, a minor bug fix. When a control was re-subclassed, I wasn't saving 
  17. the target hwnd.
  18.  
  19.  
  20. 5/23/94
  21. Message Blaster v2.1
  22. Minor bug fix. Had a problem with deleting user defined messages in 
  23. the message center. Got an internet account. Should make it easier to 
  24. get ahold of me. 
  25. My new internet address is: edstaff@mcs.com
  26.  
  27.  
  28. 4/23/94
  29.  
  30. Message Blaster v2.0
  31.  
  32. Wow,  lot's of improvements! Let see ... perhaps the biggest thing is 
  33. that the only code you have to write any more is in the message event. 
  34. I added a new property called the message center. It is vastly easier 
  35. to use than the original. As a matter of fact, to use it requires NO 
  36. code to set up. The only thing you have to do is respond to the message 
  37. event!
  38.  
  39. How?
  40.  
  41. I've added a new property called the MsgCenter. When you double-click 
  42. on this property it will bring up a dialog that will allow you to choose 
  43. which control you want to catch messages for, what messages you want to 
  44. catch, and how you want to process them. The cool part is that you don't 
  45. have to choose the target hWnd at run time (Although,   you still can if 
  46. you need to... this thing is 100% backward compatible). All of the original 
  47. functionality is still there, the only change is to the UI.
  48.  
  49. Miscellaneous new features.
  50. I added top and left properties so you can move the thing to where you want
  51. it at design time and it will stay there. Before, you would put it on the 
  52. form someplace and the next time you brought it up it "magically" moved to 
  53. the upper left corner.
  54.  
  55. I added a version stamp resource for those of you who need to keep 
  56. track of that.
  57.  
  58. For those of you who have never used it, I have included a winword doc
  59. that is the original text of the MSDN ariticle that explains the ins and 
  60. outs. 
  61.  
  62. Also in the zip file you will find several examples of how to use the 
  63. message blaster. These include a simple method for tying menus and status
  64. bars together so you can display messages as the user moves thru menus;
  65. a method for effectively creating a custom cursor in VB; and finally a 
  66. method for creating a small caption bar in VB. Good stuff. And you can't 
  67. beat the price.
  68.  
  69. Also, I recently left Microsoft to start my own business. Therefore, this 
  70. new version is longer free. It is shareware with a suggested price of $25. 
  71. Check the about box property of the details. Hey, it's only 25 bucks for 
  72. something I worked a lot on, so if you want to see more, let me know your 
  73. using it and appreciate it! For your 2000 bits, I'll send you the source 
  74. and you'll get free upgrades from here on out. Also, I am working on a OLE 
  75. control version of it, to be coming to a theater new you.
  76.  
  77. I will be happy to provide as much tech support as I have time for. However,
  78. you should understand that this control and it's use, assumes you have 
  79. knowledge of the underlying architecture of windows. If you don't understand
  80. Window's messaging, I don't have the time to explain it.
  81.  
  82. Lastly, I build these things because I thing they are fun to build. 
  83. If you have an idea for a control that you think would be a winner, drop 
  84. me a line or give me a call.
  85.  
  86. Oh yeah, one other thing, Bugs. While there are no know bugs in the vbx at
  87. this time, you never know. If you find one, let me know so I can fix it. 
  88. This thing has been in use by many, many programmers for a long time, so it's
  89. pretty stable. I am proud to say that it ships as part of a number of 
  90. Microsoft products!
  91.  
  92. Ed Staffin
  93. 758 N. Williams Drive
  94. Palatine, IL 60067
  95. phone 708-358-0484
  96.  
  97.  
  98. Later ... Ed
  99.  
  100. Message Blaster
  101. v. 1.1
  102.  
  103. Ok, here is the second release of my message blaster custom control for
  104. VB2. The primary differences are several bug fixes and a new message event 
  105. parameter. One other new feature is that you can now change the target 
  106. object at run time by merely setting the hWndTarget property.
  107.  
  108. What is it? Well, it's a control that will allow the VB programmer to catch
  109. and process Windows messages directly from within VB. This is accomplished
  110. by placing a message blaster on your form and specifying the object you
  111. want to catch messages for and what messages to catch. The message blaster
  112. should be able to catch just about any message for any control or form. You
  113. can catch up to 25 messages per target object. I suppose, if you needed to
  114. catch more than that, you could use 2 blasters and point them at the same
  115. object, but the idea of catching 25+ messages seems remote to me.
  116.  
  117. Normally, you would specify the target controls and what messages to catch
  118. in the form load section of your form. For example:
  119.  
  120. Sub Form_Load ()
  121.     Const PREPROCESS = -1
  122.     Const EATMESSAGE = 0
  123.     Const POSTPROCESS = 1
  124.     
  125.     MsgBlaster1.hWndTarget = text1.hWnd
  126.     MsgBlaster1.MsgList(0) = WM_NCHITTEST
  127.  
  128.     MsgBlaster2.hWndTarget = text2.hWnd
  129.     MsgBlaster2.MsgList(0) = WM_LBUTTONDOWN
  130.     MsgBlaster2.MsgPassage(0) = EATMESSAGE
  131.     MsgBlaster2.MsgList(1) = WM_RBUTTONDOWN
  132.     
  133.  
  134.     MsgBlaster3.hWndTarget = example.hWnd
  135.     MsgBlaster3.MsgList(0) = WM_MENUSELECT
  136.  
  137. End Sub
  138.  
  139.  
  140. Now, when you run your application, the Message Blaster will monitor the
  141. message stream for your targeted controls. When it finds a message that
  142. you are interested in it will fire an event as follows:
  143.  
  144. Sub MsgBlaster1_Message (MsgVal As Integer, wParam As Integer, lParam As Long, ReturnVal As Long)
  145.  
  146.     ' Do your message processing here
  147.  
  148.     MsgBox "Just got a WM_NCHITTEST"
  149.     
  150.     ' Do some processing to see where you hit and then return the appropriate
  151.     ' value to windows
  152.     
  153.     ReturnVal = HT_BORDER
  154.  
  155. End Sub
  156.  
  157. When dealing with windows messages there may be times when you would not
  158. want to pass the message you catch on to VB. This is why I provide a
  159. property array called MsgPassage. This property allows you to specify how
  160. you want the message blaster to handle target messages. PREPROCESS means
  161. that the message will be passed on to VB prior to the Message Blaster's
  162. message event is fired. EATMESSAGE is just what is suggests, the Message
  163. Blaster eats the message and fires the message event. POSTPROCESS, which is
  164. the default, means that the Message Blaster fires the message event first,
  165. then passes the message on to VB.
  166.  
  167. There is only a couple of messages that I know of that I can't
  168. catch...WM_CREATE and WM_NCCREATE. This is because The target control is
  169. already existant when you tell the message blaster about it.
  170.  
  171. I suppose I should put in a caution here. This is, in some ways, subverting
  172. VB. Because of this, the user of this control should be careful how they use
  173. this control. I have found that if VB is already providing support for
  174. certain messages (i.e. click, keypress etc.) don't use my control to catch
  175. them. Although it will work just fine, you may, on certain messages not
  176. always get the results you would expect.
  177.  
  178. Here are some of the things that I have heard that people want to use this
  179. for:
  180.  
  181. 1. Catching WM_MENUINIT and WM_MENUSELECT messages so they can change status
  182. bars as the user moves through menus.
  183.  
  184. 2. Catching WM_NCHITTEST for all kinds of things.
  185.  
  186. 3. Catching WM_DROPFILE
  187.  
  188. 4. Catching DDE stuff.
  189.  
  190. 5. Catching WAV file stuff
  191.  
  192. And I'm sure you'll find more.
  193.  
  194. I am including a file called Messages.txt that contains most of the Windows
  195. Messages defined in VB format (i.e. Global Const WM_MENUSELECT = &H11F).
  196.  
  197. There is also and example program that illustrates the use of the Message
  198. Blaster.                 
  199.  
  200. A new example, created by Jim Cash and Randall Kern, show how to use the msgblaster to create 
  201. small captioned window, similar to that of the toolbox in vb. Check it out
  202. it's cool!
  203.  
  204. Please let me know if there are any bugs. Also, if you have any ideas for
  205. improvement let me know. I would be very interested in hearing how you use
  206. this control.
  207.  
  208. Oh, by the way, check out the about box, it's good for my head.
  209.  
  210. I would like to thank chrisfr who helped me find a nasty bug that was 
  211. keeping me up at night.                                               
  212.  
  213. Also, thanks to Jimc and t-randyk for a nice improvement to the program.
  214.  
  215. Enjoy it!
  216.